var conf = require("./webpackConfig")
var path = require('path');
var utils = require('./utils')
var projectRoot = path.resolve(__dirname, '../') + "/"
const webpack = require('webpack');
var merge = require('webpack-merge')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
var CompressionWebpackPlugin = require('compression-webpack-plugin');


Object.keys(conf.entry).forEach(function (name) {

    // switch (name) {
    //     case "app":
    //         conf.entry.app = './src/main.js'
    //         break;

    //     default:
    //         break;
    // }

})


module.exports = merge(conf, {


    plugins: [
        new webpack.HotModuleReplacementPlugin()
    ],
    devServer: {
        proxy: { // proxy URLs to backend development server
            '/api': 'http://localhost:1337'
        },
        contentBase: path.join(__dirname, 'public'), // boolean | string | array, static file location
        compress: true, // enable gzip compression
        historyApiFallback: true, // true for index.html upon 404, object for multiple paths
        hot: true, // hot module replacement. Depends on HotModuleReplacementPlugin
        https: false, // true for self-signed, object for cert authority
        noInfo: true, // only errors & warns on hot reload
    }



})